import { Controller, Get, Post, Body, Patch, Param, Delete, Query } from '@nestjs/common';
import { MatterSubmitService } from './matter-submit.service';
import { CreateMatterSubmitDto } from './dto/create-matter-submit.dto';
import { UpdateMatterSubmitDto } from './dto/update-matter-submit.dto';

@Controller('matter-submit')
export class MatterSubmitController {
  constructor(private readonly matterSubmitService: MatterSubmitService) { }

  @Post()
  create(@Body() createMatterSubmitDto: CreateMatterSubmitDto) {
    return this.matterSubmitService.create(createMatterSubmitDto);
  }

  @Get()
  findAll(@Query() querys) {
    return this.matterSubmitService.findAll(querys);
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.matterSubmitService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateMatterSubmitDto: UpdateMatterSubmitDto) {
    return this.matterSubmitService.update(id, updateMatterSubmitDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.matterSubmitService.remove(id);
  }

  @Post("submit")
  submit(@Body() body) {
    return this.matterSubmitService.submit(body);
  }
}
